package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.ResponseDTO;
import com.jzo2o.customer.service.WorkRejectReasonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 86188
 */

@RestController("WorkerCertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务人员相关接口")
public class WorkRejectReasonController {

    @Resource
    private WorkRejectReasonService workRejectReasonService;
    @PostMapping
    @ApiOperation("服务端提交认证申请")
    public void certificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        workRejectReasonService.certificationAudit(workerCertificationAuditAddReqDTO );
    }


    /**
     * 查询最新驳回原因
     *
     *
     */

    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    //查询最新原因 并返回
    public ResponseDTO rejectReason() {
        return workRejectReasonService.rejectReason();
    }




}
